import { nextTick } from 'vue'

export const getResize = (option: any, chart: any) => {
  option && chart.setOption(option)
  // 图表自适应
  nextTick(() => {
    window.addEventListener('resize', () => {
      chart && chart.resize()
    })
  })
}
